﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tarea5
{
    interface ModelInterface : ObservableInterface
    {
        /// <summary>
        /// Initialize (or reset) this model.
        /// </summary>
        /// <param name="sleepInterval">Time interval in miliseconds between next step in non-interactive models</param>
        /// <param name="size">Board size</param>
        void Initialize(int sleepInterval, int size, bool HumanMakesFirstMove);
        
        /// <summary>
        /// In interactive mode, try to set an element at certain position.
        /// </summary>
        /// <param name="row">row coordinate</param>
        /// <param name="col">col coordinate</param>
        /// <returns>-1 if the element could not be placed at position (row,col), the element's index otherwise.</returns>
        int SetPosition(int row, int col);

        /// <summary>
        /// In interactive mode, undo last move.
        /// </summary>
        /// <returns>-1 if there was no previous move, the index of the move undone otherwise.</returns>
        int UndoLastMove();

        /// <summary>
        /// Start a previously configured model. Override if model is interactive.
        /// </summary>
        void Start();

        /// <summary>
        /// Pause a running model. Override if model is interactive.
        /// </summary>
        void Pause();

        /// <summary>
        /// Stop a running model. Override if model is interactive.
        /// </summary>
        void Stop();

        /// <summary>
        /// Gets whether this model is running in a non-interactive fashion.
        /// </summary>
        bool IsRunning { get; }

        /// <summary>
        /// Gets whether this model has stopped after running in a non-interactive fashion.
        /// </summary>
        bool IsStopped { get; }

        /// <summary>
        /// Gets whether this model has been paused when running in a non-interactive fashion.
        /// </summary>
        bool IsPaused { get; }

        /// <summary>
        /// Sets/Gets this model's sleep interval between each step, in miliseconds.
        /// </summary>
        int SleepInterval { get; set;}

        /// <summary>
        /// Gets this model's board side size.
        /// </summary>
        int Size { get; }
    }
}
